The "Text" object
Properties Overview
The “Text” object has many features. It can display text in a frame and be filled with a color. The text can be displayed using any font of any size and style. All the properties can be set visually with the help of the toolbars.
Most important properties are:
Text |
Text is the most important property of an object in which a text or an expression is defined. |
AutoWidth |
Determines if the text object should adjust the width according to the length of the text. It is recommended to be turned off In the tables. |
WordWrap |
Determines if too long text will be spilled into a new line. If the AutoWidth property is turned on, it does not matter. |
DisplayFormat |
Specifies the data format in the object (text, number, date/time). |
HideZeros |
Specifies if the value zero is displayed. This setting is recommended to be checked in the date/time type of data. otherwise "strange" values are displayed if the value is not defined. |
AllowExpressions |
Determines if the text object may contain expression inside the text |
Properties available only in the Object inspector:
GapX |
text indents from left and right edges, in pixels |
GapY |
text indents from top and bottom edges, in pixels |
LineSpacing |
spacing between lines, in pixels |
CharSpacing |
sрасing between characters, in pixels |
ParagraphGap |
first line indent for the paragraph, in pixels |
Rotation |
Specifies the direction of text display. 0 - horizontal, 90 - upwards ... We can also print in italics. |
StretchMode |
Specifies how the object should be adjusted to the length of the text. The following values are available: smDontStretched - height is changing, smActualHeight - height adjusts to the height of the text or image, smMaxHeight - the height adjusts to the height of the waist.
|
Font |
Specifies font settings that are similar to text editors |
Color |
Specifies the background color. A special value is the translucent (transparent) clNone color. |
BrushStyle |
type of object filling |
HTML-tags in the "Text" Object
The "Text" object does understand some simple HTML tags. Tags can be located within the text of the object. Tags are disabled by default, but to enable them either select “Allow HTML tags” in the object context menu or enable the “AllowHTMLTags” property in the Object inspector. Here is the list of supported tags:
<b> : bold text
<i> : italic text
<u> : underlined text
<sub> : subscript
<sup> : superscript
<font color> : font color
<nowrap> : text which is not split when "WordWrap" is enabled, the whole text is shifted to the next line
Note that only a few tags are supported, but this should be enough for the majority of applications. It is not possible to modify the font size or name by means of HTML tags.
"RichText" Object
For formatting in the rich text format (RTF) you can use the "RichText" object
.